﻿@* 应用层树形参数 *@
@using Util.Generators.Helpers
@model Util.Generators.Contexts.EntityContext
@{
    var service = new GenerateService( Model );
    var dto = service.GetDto();
    var description = $"{Model.Description}参数";
}
namespace @service.GetApplicationNamespace( "Dtos",true );

/// <summary>
/// @description
/// </summary>
public class @dto : TreeDtoBase<@dto> {
@foreach (var property in Model.Properties) {
    if ( property.IsKey )
        continue;
    if ( property.IsExtraProperties )
        continue;
    if ( property.IsDeleted )
        continue;
    if ( service.IsTreeEntityProperty( property ) )
        continue;
<text>    /// <summary>
    /// @property.Description
    ///</summary>@service.GetPropertyI18nDisplay(property)
    @if ( service.HasDataAnnotations( property ) ) {
        @service.GetDataAnnotations( property )
    }
    public @property.TypeName @property.Name { get; set; }
</text>
}

    /// <inheritdoc />
    public override string GetText() {
    @if ( service.Exists( t => t.Name == "Name" ) ) {
        @:return Name;
    }
    else {
        @:return null;
    }
    }
}